package com.sodaopen.study.service.impl;

import com.sodaopen.study.entity.Locked;
import com.sodaopen.study.mapper.LockedMapper;
import com.sodaopen.study.service.LockedService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LockedServiceImpl implements LockedService {

    @Autowired
    private LockedMapper lockedMapper;

    @Override
    public List<Locked> findAll() {
        return lockedMapper.selectAll();
    }

    @Override
    public void deleteLocked(Integer userId, Integer courseId) {
        lockedMapper.deleteUserLocked(userId, courseId);
    }
}
